# Contributor: Will Sinatra <wpsinatra@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=leiningen
pkgver=2.9.8
pkgrel=0
pkgdesc="Automate Clojure Projects"
options="!check" #No Checks
url="https://leiningen.org/"
arch="noarch !riscv64" # blocked by java-jdk
license="EPL-1.0"
depends="bash java-jdk"
subpackages="$pkgname-doc
	$pkgname-bash-completion
	$pkgname-zsh-completion
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/technomancy/leiningen/archive/refs/tags/$pkgver.tar.gz
	https://github.com/technomancy/leiningen/releases/download/$pkgver/leiningen-$pkgver-standalone.jar"

package() {
	install -Dm755 "$builddir/bin/lein-pkg" \
		"$pkgdir/usr/bin/lein"

	install -Dm644 "$builddir/doc/lein.1" \
		"$pkgdir/usr/share/man/man1/lein.1"

	install -Dm 644 "$srcdir/leiningen-$pkgver-standalone.jar" \
		"$pkgdir/usr/share/java/leiningen-$pkgver-standalone.jar"

	install -Dm644 bash_completion.bash \
		"$pkgdir"/usr/share/bash-completion/completions/lein
	install -Dm644 zsh_completion.zsh \
		"$pkgdir"/usr/share/zsh/site-functions/_lein
}

sha512sums="
8603ffb2ac188cfa90d5430f595aae1dc15134c317c39c14f7106645b55c9f2451ab0339e60cef2cd2e99b701ebbc87063283ad3d090ed6921b1822d09518205  leiningen-2.9.8.tar.gz
de4989bf31fe86bfb943d90b683dd17a7417c267e67ac8036967ed352e47a4361b8b6ec8378a1e6cf24fd8df51bcabb9578bc8f487d812c9fb5c2f5f476016cd  leiningen-2.9.8-standalone.jar
"
